/*
 * Powered By [Seven]
 * Since 2016 - 2019
 */


package com.czmh.etc.onlinepubsys.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

@Entity
@Table(name = "qr_promoters")
public class QrPromoters extends BaseModel {
	
	//alias
	public static final String TABLE_ALIAS = "QrPromoters";
	public static final String ALIAS_PROMOTERID = "主键id";
	public static final String ALIAS_PROMOTER_NAME = "推广员名称";
	public static final String ALIAS_PROMOTER_PHONE = "推广员手机号码";
	public static final String ALIAS_BINDCODECOUNT = "绑定二维码数";
	public static final String ALIAS_CREATETIME = "创建时间";
	public static final String ALIAS_UPDATETIME = "更新时间";
	 
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	@Id
	@Column(name = "promoterid")
	private java.lang.String promoterid;
	@Column(name = "promoter_name")
	private java.lang.String promoter_name;
	@Column(name = "promoter_phone")
	private java.lang.String promoter_phone;
	@Column(name = "bindcodecount")
	private java.lang.Long bindcodecount;
	@Column(name = "parent_id")
	private java.lang.String parent_id;
	@Column(name = "user_id")
	private java.lang.String user_id;
	@Column(name = "createtime")
	private java.util.Date createtime;
	@Column(name = "updatetime")
	private java.util.Date updatetime;
	//columns END

	public QrPromoters(){
	}

	public QrPromoters(
		java.lang.String promoterid
	){
		this.promoterid = promoterid;
	}
	
	public java.lang.String getUser_id() {
        return user_id;
    }

    public void setUser_id(java.lang.String user_id) {
        this.user_id = user_id;
    }

    /**  
	 * 设置主键id  
	 * @param promoterid 主键id  
	 */  
	public void setPromoterid(java.lang.String promoterid) {
		this.promoterid = promoterid;
	}
	
	/**  
	 * 获取主键id   
	 * @return promoterid 主键id   
	 */
	public java.lang.String getPromoterid() {
		return this.promoterid;
	}
	/**  
	 * 设置推广员名称  
	 * @param promoter_name 推广员名称  
	 */  
	public void setPromoter_name(java.lang.String promoter_name) {
		this.promoter_name = promoter_name;
	}
	
	/**  
	 * 获取推广员名称   
	 * @return promoter_name 推广员名称   
	 */
	public java.lang.String getPromoter_name() {
		return this.promoter_name;
	}
	/**  
	 * 设置推广员手机号码  
	 * @param promoter_phone 推广员手机号码  
	 */  
	public void setPromoter_phone(java.lang.String promoter_phone) {
		this.promoter_phone = promoter_phone;
	}
	
	/**  
	 * 获取推广员手机号码   
	 * @return promoter_phone 推广员手机号码   
	 */
	public java.lang.String getPromoter_phone() {
		return this.promoter_phone;
	}
	/**  
	 * 设置绑定二维码数  
	 * @param bindcodecount 绑定二维码数  
	 */  
	public void setBindcodecount(java.lang.Long bindcodecount) {
		this.bindcodecount = bindcodecount;
	}
	
	/**  
	 * 获取绑定二维码数   
	 * @return bindcodecount 绑定二维码数   
	 */
	public java.lang.Long getBindcodecount() {
		return this.bindcodecount;
	}
	/**  
	 * 设置创建时间  
	 * @param createtime 创建时间  
	 */  
	public void setCreatetime(java.util.Date createtime) {
		this.createtime = createtime;
	}
	
	/**  
	 * 获取创建时间   
	 * @return createtime 创建时间   
	 */
	public java.util.Date getCreatetime() {
		return this.createtime;
	}
	/**  
	 * 设置更新时间  
	 * @param updatetime 更新时间  
	 */  
	public void setUpdatetime(java.util.Date updatetime) {
		this.updatetime = updatetime;
	}
	
	/**  
	 * 获取更新时间   
	 * @return updatetime 更新时间   
	 */
	public java.util.Date getUpdatetime() {
		return this.updatetime;
	}
	
	public java.lang.String getParent_id() {
        return parent_id;
    }

    public void setParent_id(java.lang.String parent_id) {
        this.parent_id = parent_id;
    }

    public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("promoterid",getPromoterid())
			.append("promoter_name",getPromoter_name())
			.append("promoter_phone",getPromoter_phone())
			.append("bindcodecount",getBindcodecount())
			.append("createtime",getCreatetime())
			.append("updatetime",getUpdatetime())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getPromoterid())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof QrPromoters == false) {
			return false;
		}
		if(this == obj) {
			return true;
		}
		QrPromoters other = (QrPromoters)obj;
		return new EqualsBuilder()
			.append(getPromoterid(),other.getPromoterid())
			.isEquals();
	}
}

